package com.IR.moneys.service;

import java.util.Date;

import javax.annotation.Resource;


import com.IR.shop.mapper.CashMapper;
import com.IR.shop.po.Cash;
public class ACashBiz {
	@Resource
	private CashMapper cashmapper;
	
	//��ˮ���
	//���֡�������˿��С�����������桢һ����˿��С������������
	@SuppressWarnings("finally")
	public int saveCachEarn(Cash cash) {
		Date d = new Date();
		cash.setChshdate(d);
		int result =0;
		try {
			result = cashmapper.insert(cash);
		} finally {
			return result;
		}
	}
	@SuppressWarnings("finally")
	public int saveCachEarn1(Long userid,String cashremark,Double cashint) {
		Date d = new Date();	
		Cash cash = new Cash();
		cash.setCashint(cashint);
		cash.setCashremark(cashremark);
		cash.setChshdate(d);
		cash.setUserid(userid);
		int result =0;
		try {
			cashmapper.insert(cash);
		} finally {
			return result;
		}
	}
	
}
